//
//  RSDefineHeaders.h
//  NetworkTaxiDriver
//
//  Created by thinkjoy on 16/8/29.
//  Copyright © 2016年 Thinkjoy_RS. All rights reserved.
//

#ifndef RSDefineHeaders_h
#define RSDefineHeaders_h

#import "RSToolHeaders.h"
//#import "RSPodsHeaders.h"
//#import "RSCustomUIViewHeader.h"

#define kWinH [[UIScreen mainScreen] bounds].size.height
#define kWinW [[UIScreen mainScreen] bounds].size.width

//宽高比系数
#define WFACTOR (kWinW/320)
#define HFACTOR (kWinH/568)

#define StatusBar_H 20
#define ToolBar_H   44  //工具条的高度
#define Navigation_H    (StatusBar_H+ToolBar_H) //导航栏的高度(64)
#define TabBar_H    49  //tabbar的高度

// 非空判断
#define NotNilAndNull(_ref)          (((_ref) != nil) && (![(_ref) isEqual:[NSNull null]]) && ([(_ref) length]!=0) && (![(_ref)isEqualToString:@" "]))

#define IsNilOrNull(_ref)            (((_ref) == nil) || ([(_ref) isEqual:[NSNull null]]) || ([(_ref) length]==0) || ([(_ref)isEqualToString:@" "]))

//字符串是否为空
#define IsStrEmpty(_ref)             (((_ref) == nil) || ([(_ref) isEqual:[NSNull null]]) || ([(_ref)isEqualToString:@""]) || ([(_ref) length]==0))
//数组是否为空
#define IsArrEmpty(_ref)             (((_ref) == nil) || ([(_ref) isEqual:[NSNull null]]) ||([(_ref) count] == 0))
//字典是否为空
#define IsDicEmpty(_ref)             (((_ref) == nil) || ([(_ref) isEqual:[NSNull null]]) ||([[(_ref) allKeys] count]  == 0))

//断言工具
//#define NSParameterAssert(condition) NSAssert((condition), @"Invalid parameter not satisfying: %@", @#condition)

#pragma mark - 日志开关
#ifdef DEBUG
#define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
#define DLog(...)
#endif


#define OC(str) [NSString stringWithCString:(str) encoding:NSUTF8StringEncoding]
#define WS(weakSelf)  __weak __typeof(&*self)weakSelf = self;

// 取得AppDelegate单利
#define ShareApp ((AppDelegate *)[[UIApplication sharedApplication] delegate])

// NSUserDefaults 的单例对象
# define NUD [NSUserDefaults standardUserDefaults]

//电网测试服服务器地址
//#define BaseHostURL @"http://112.74.108.216:8088/smart/"

//本地服务器
//#define BaseHostURL @"http://192.168.0.223:8087/api/"
//#define BaseHostURL @"http://192.168.0.223:8088/api/"

//测试服务器
#define BaseHostURL @"http://112.74.108.216:8088/taxi-api/"



#endif /* RSDefineHeaders_h */
